import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/about-popup',
            name: 'AboutPopup',
            component: () => import('@/views/AboutPopup.vue'),
        },
        {
            path: '/',
            redirect: '/login',
        },
        {
            path: '/home',
            name: 'home',
            component: HomeView,
        },
        {
            path: '/order',
            name: 'order',
            component: () => import('@/views/OrderView.vue')
        },
        {
            path: '/find',
            name: 'find',
            component: () => import('@/views/FindView.vue')
        },
        {
            path: '/my',
            name: 'my',
            component: () => import('@/views/MyView.vue')
        },
        {
            path: '/pay',
            name: 'pay',
            component: () => import('@/views/PayView.vue')
        },
        {
            path: '/shopcar',
            name: 'shopcar',
            component: () => import('@/views/ShopCarView.vue')
        },
        {
            path: '/mybalance',
            name: 'mybalance',
            component: () => import('@/views/MyBalanceView.vue')
        },
        {
            path: '/address',
            name: 'address',
            component: () => import('@/views/AddressView.vue')
        },
        {
            path: '/storedetails',
            name: 'storedetails',
            component: () => import('@/views/StoreDetailsView.vue')
        },
        {
            path: '/mystarstore',
            name: 'mystarstore',
            component: () => import('@/views/MyStarStoreView.vue')
        },
        {
            path: '/myaddress',
            name: 'myaddress',
            component: () => import('@/views/MyAddressView.vue')
        },
        {
            path: '/delicacies',
            name: 'delicacies',
            component: () => import('@/views/DelicaciesView.vue')
        },
        {
            path: '/login',
            name: 'login',
            component: () => import('@/views/LoginView.vue')
        },
        {
            path: '/register',
            name: 'register',
            component: () => import('@/views/RegisterView.vue')
        },
        {
            path: '/mystarlacarte',
            name: 'mystarlacarte',
            component: () => import('@/views/MyStarLaCarteView.vue')
        },
        {
            path: '/settings',
            name: 'settings',
            component: () => import('@/views/SettingPageView.vue')
        },
        {
            path: '/changepassword',
            name: 'changepassword',
            component: () => import('@/views/ChangePasswordView.vue')
        },
        {
            path: '/publishupdates',
            name: 'publishupdates',
            component: () => import('@/views/PublishUpdatesView.vue')
        },
        {
            path: '/addresschange',
            name: 'addresschange',
            component: () => import('@/views/AddressChangeView.vue')
        },
        {
            path: '/addressadd',
            name: 'addressadd',
            component: () => import('@/views/AddressAddView.vue')
        },
        {
            path:'/editaddress',
            name:'editaddress',
            component:()=>import('@/views/EditAddress.vue')
        },
    ],
})

export default router
